package org.jeecg.modules.htxincailiao.analytics.domain.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.contant.HTClient;

@Data
public class HTNewsDetailClientVisitDistributionVO {

    @ApiModelProperty(value = "系统类型")
    private Integer clientOs;

    @ApiModelProperty(value = "系统访问次数")
    private Integer clientPVCount;

    @ApiModelProperty(value = "系统独立访客数")
    private Integer clientUVCount;

    @ApiModelProperty(value = "系统总浏览时长")
    private float clientTotalBrowseTime;

    @ApiModelProperty(value = "系统平均浏览时长")
    private float clientAverageBrowseTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "客户端操作系统")
    private String clientOsString;


    public String getClientOsString() {
        if (clientOs < 0) {
            clientOs = 0;
        }
        if (clientOs > HTClient.Clients.length - 1) {
            clientOs = HTClient.Clients.length - 1;
        }
        return HTClient.Clients[clientOs];
    }
}
